/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cart.hibernate.releaseCompany;

/**
 *
 * @author BibooChung
 */
import java.util.Set;
import java.util.HashSet;
import cart.hibernate.movieInformation.*;

public class ReleaseCompany {
    private int releaseCompanyId;
    private String releaseCompanyName;

    private Set<MovieInformation> movies = new HashSet<MovieInformation>();

    public ReleaseCompany(){
    }

    public ReleaseCompany(String releaseCompanyName){
        this.releaseCompanyName = releaseCompanyName;
    }

    public ReleaseCompany(ReleaseCompany releaseCompany){
        this.releaseCompanyName = releaseCompany.getReleaseCompanyName();
    }

    public int getReleaseCompanyId(){
    return releaseCompanyId;
    }
    /**
     * Getter of releaseCompanyName
     * @return this.releaseCompanyName
     */
    public String getReleaseCompanyName(){
        return releaseCompanyName;
    }

    public Set<MovieInformation> getMovies() {  
     //   Set<MovieInformation> newMoviesSet = new HashSet<MovieInformation>(movies);
    //    return newMoviesSet;  
        return movies;
    }  

    /**
     * Setter of releaseCompanyId
     * @param id set releaseCompanyId to id's value
     */
    public void setReleaseCompanyId(int id) {
        this.releaseCompanyId = id;
    }
    /**
     * Setter of releaseCompanyName
     * @param releaseCompanyName set releaseCompanyName to releaseCompanyName's value
     */
    public void setReleaseCompanyName(String releaseCompanyName){
        this.releaseCompanyName = releaseCompanyName;
    }

    public void setMovies(Set<MovieInformation> movies) {  
        //this.movies = new HashSet<MovieInformation>(movies);
        this.movies = movies;
    }  
}
